﻿@model IEnumerable<PersonalWebsite.Models.News>

@{
    ViewBag.Title = "Index";
}

<table class="layui-table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.NewsType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.NewsDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ImgSrc)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ImgText)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.BigImg)
            </th>
            <th></th>
        </tr>
    </thead>

    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.NewsType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NewsDate)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ImgSrc)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ImgText)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.BigImg)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.NewsID }) |
                    @Html.ActionLink("Details", "Details", new { id = item.NewsID }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.NewsID })
                </td>
            </tr>
        }
    </tbody>
</table>